{extend name="public/base" /} {block name="body"}
<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li><strong>房台管理</strong></li>
	</ol>
</div>
<div class="ibox float-e-margins">
	{include file="line_table/top"}
	<div class="ibox-content">
		<div class="row">
			<div class="col-sm-12">
				<div class="col-sm-2">
					<div class="input-group">
						<a href="{:url('add')}" class="btn btn-xs btn-primary">添加房台</a>
					</div>
				</div>
			</div>
		</div>
		<form method="post" action="{:url('index')}">
			<div class="form-group" style="padding-left: 20px;">
				房台名称 <input type="text" id="table_name" name="table_name" value="" placeholder="请输入房台名称" class="bank" />
				<span class="bank"><button type="submit" class="btn btn-sm btn-primary"><li class="fa fa-search"> 查询</li></button> </span>
			</div>
		</form>
		<div class="example-wrap">
			<div class="example">				
					<table class="table table-bordered table-hover">
						<thead>
							<tr class="long-th">
								<th width="50">ID</th>
								<th>房台名称</th>
								<th>所属分类</th>
								<th>适用人数</th>
								<th>状态</th>
								<th>排序</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							{foreach name="list" item="ad"}
							<tr>	
								<td class="text-center">{$ad.id}</td>
								<td class="text-center">{$ad.table_name}</td>
								<td class="text-center">{$ad.type_name}</td>
								<td class="text-center">{$ad.scope_limit}</td>
								<td class="text-center">
                        			{if $ad.status == 1}
                        			正常
                        			{else}
                        			失效
                        			{/if}
                        		</td>
								<td class="text-center">{$ad.sort}</td>
								<td class="text-center">
									<a href="{:url('edit',['id'=>$ad.id])}" class="btn btn-primary bnt-sm">
										<i class="fa fa-paste"></i> 编辑</a>&nbsp;&nbsp;
									<a href="{:url('delete',['id'=>$ad.id])}" class="btn btn-danger bnt-sm ajax-delete">
										<i class="fa fa-trash-o"></i> 删除</a>
								</td>
							</tr>
							{/foreach}
						</tbody>
					</table>
					<div style="text-align: right;">
                      {$list->render()}
                   </div>				
			</div>
		</div>
	</div>
</div>
{/block} {block name="script"}
<script>
	//顶部导航
	$("#li-bar-index").addClass("active");
</script>
<style>
.bank{
	width: 150px;
    height:30px;
    text-align:center;
    border-radius:5px;
}
</style>
{/block}